<?php
require_once("includes/prepend.php");
require_once("includes/lifesubnav.php");
$friends = $page->friends;
$friendClass = $page->friendClass;
$displayMes = $page->displayMes;
$targetFriend = $page->targetFried;
$updateId= $page->updateId;
?>

<div id="maincontent"><!--start maincontent-->
	<div id="fixposition"></div>
	<div id="displayMsg" style="color:black;" >
	<?php 
	if($displayMes=="updatesuccess"){
		echo "<script>
		HHL.newAlertMes('更新成功！','z-index:5','1500');
		setTimeout(\"window.location.href='friendlist.php'\",'2000');
		</script>";
	}else if($displayMes=="addsuccess"){
		echo "<script>
		HHL.newAlertMes('添加成功！','z-index:5','1500');
		setTimeout(\"window.location.href='friendlist.php'\",'2000');
		</script>";
	}
	?></div>
	<div id="addfriendMes"><a href="friendlist.php" class="addNewFriendMes">返回</a></div>
	<div style="clear:both"></div>
	<div id="addFriend">
		<form action="friendmanage.php" method="POST" class="addFriendForm" id="addFriendForm" >
			<div id="itemInit">
			<input type="hidden" name="updateId" value="<?php echo $updateId; ?>" />
			姓名：<input type="text" name="friendName" id="friendName" class="loginuserzhanghao5" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" value="<?php echo $targetFriend['friendName']?>" /> 
			手机：<input type="text" name="tel" id="tel" class="loginuserzhanghao7" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" value="<?php echo $targetFriend['tel']?>"  /><br />
			Q&nbsp;Q：<input type="text" name="qq" id="qq" class="loginuserzhanghao3" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)"  value="<?php echo $targetFriend['qq']?>"  />
			MSN：<input type="text" name="msn" id="msn" class="loginuserzhanghao6" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)"  value="<?php echo $targetFriend['msn']?>"  /><br />
			E-Mail：<input type="text" name="email" id="email" class="loginuserzhanghao4" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)"  value="<?php echo $targetFriend['e_mail']?>" />
			通讯地址：<input type="text" name="address" id="address" class="loginuserzhanghao" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)"  value="<?php echo $targetFriend['address']?>"  /><br />
			附件信息：<input type="text" name="otherInfo" id="otherInfo" class="loginuserzhanghao8" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" value="<?php echo $targetFriend['otherInfo']?>"  />
			分类：<select class="managefenlei" id="managefenleinit" name="managefenlei"><?php echo $friendClass;?></select><a onclick="addNewFenLei(this)" class="newfenlei">增加新分类</a><br />
			</div>
			<!--<div id="item0">
			姓名：<input type="text" name="friendName" id="friendName" class="loginuserzhanghao5" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" /> 
			手机：<input type="text" name="tel" id="tel" class="loginuserzhanghao7" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" /><br />
			Q&nbsp;Q：<input type="text" name="qq" id="qq" class="loginuserzhanghao3" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" />
			MSN：<input type="text" name="msn" id="msn" class="loginuserzhanghao6" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" /><br />
			E-Mail：<input type="text" name="email" id="email" class="loginuserzhanghao4" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" />
			通讯地址：<input type="text" name="address" id="address" class="loginuserzhanghao" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" /><br />
			附件信息：<input type="text" name="otherInfo" id="otherInfo" class="loginuserzhanghao8" onfocus="setMouseOnfouseStyle(this)" onblur="setMouseOnblurStyle(this)" />
			分类：<select class="managefenlei" id="managefenleis" name="managefenlei"><?php echo $friendClass;?></select><a onclick="addNewFenLei(this)" class="newfenlei">增加新分类</a><br />
			</div>-->
			
			<!--<input type="button"  class="loginSubmit2"  value="继续添加" onclick="newItem()" /> <br />-->
			<input type="submit"  class="loginSubmit"  value="提交" /> <!--<input type="button"  class="loginreset"  value="取消" onclick="closeaddFreind()" />--> 
		
			</form>
	</div>
	
</div><!--end maincontent-->
	
<script>
function displayMesControl(htmlData){	
	var displayMesBlock = document.getElementById("displayMsg");
	displayMesBlock.innerHTML = htmlData;
}
//setTimout(displayMesControl(""),5000);
</script>
<?php require_once("includes/pagefoot.php");
?>
